﻿<UserControl x:Class="CI.Views.SheetsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:cal="clr-namespace:Caliburn.PresentationFramework.ApplicationModel;assembly=Caliburn.PresentationFramework" xmlns:PresentationFramework="clr-namespace:Caliburn.PresentationFramework;assembly=Caliburn.PresentationFramework" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <TabControl Grid.Row="1" Grid.Column="1" Margin="5" ItemsSource="{Binding Presenters}" SelectedItem="{Binding CurrentPresenter}" TabStripPlacement="Top">
            <TabControl.ItemTemplate>
                <DataTemplate>
                    <ContentControl>
                        <DockPanel>
                            <Button Visibility="{Binding CanShutdown, Converter={StaticResource VisibilityConverter}, Mode=TwoWay}" PresentationFramework:Message.Attach="[Event Click] = [Action ShutdownPresenter($datacontext)]" DockPanel.Dock="Right">
                                <Path StrokeThickness="0.5"
                          Stroke="#FF333333" Fill="#FF969696"
                          Data="F1 M 2.28484e-007,1.33331L 1.33333,0L 4.00001,2.66669L 6.66667,6.10352e-005L 8,1.33331L 5.33334,4L 8,6.66669L 6.66667,8L 4,5.33331L 1.33333,8L 1.086e-007,6.66669L 2.66667,4L 2.28484e-007,1.33331 Z "/>
                            </Button>

                            <TextBox Text="{Binding DisplayName}" />
                        </DockPanel>
                    </ContentControl>
                </DataTemplate>
            </TabControl.ItemTemplate>

            <TabControl.ContentTemplate>
                <DataTemplate>
                    <ContentControl cal:View.Model="{Binding}"/>
                </DataTemplate>
            </TabControl.ContentTemplate>
        </TabControl>
    </Grid>
</UserControl>
